package com.haoze.nurseapp.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haoze.common.enumeration.StateEnum;
import com.haoze.common.model.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

@Table(name = "sysmn.SYS_BED_DICT")
public class BedEntity implements Serializable {
    @Id
    @Column(name = "BED_ID")
    private String bedId;
    @Column(name = "SERIAL_NUMBER")
    private String serialNumber;
    @Column(name = "WARD_DEPT_ID")
    private String wardDeptId;
    @Column(name = "DEPT_ID")
    private String deptId;
    @Column(name = "WARD_ROOM_NO")
    private String wardRoomNo;
    @Column(name="BED_NO")
    private String bedNo;
    @Column(name="STOP_FLAG")
    private String stopFlag;
    @Column(name="PY_CODE")
    private String pyCode;
    @Column(name="WB_CODE")
    private String wbCode;
    @Column(name="DEPT_SORT")
    private String deptSort;
    @Column(name="DEL_FLAG")
    private String delFlag;
    @Column(name="BED_LABEL")
    private String bedLabel;
    @Column(name="BED_STATUS")
    private String bedStatus;
    @Column(name="BED_GRADE")
    private String bedGrade;
    @Column(name="BED_CATEGORY")
    private String bedCategory;
    @Column(name="BED_SEX")
    private String bedSex;
    /**
     * 数据版本
     */
    @Column(name = "DATA_VERSION")
    protected Integer dataVersion;

    @Column(name = "GMT_CREATE")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Timestamp gmtCreate;

    @Column(name = "GMT_MODIFY")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected Timestamp gmtModify;
    /**
     * 医疗机构
     */
    @Column(name = "HOSPITAL_ID")
    protected String hospitalId;

    public String getBedId() {
        return bedId;
    }

    public void setBedId(String bedId) {
        this.bedId = bedId;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getWardDeptId() {
        return wardDeptId;
    }

    public void setWardDeptId(String wardDeptId) {
        this.wardDeptId = wardDeptId;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getWardRoomNo() {
        return wardRoomNo;
    }

    public void setWardRoomNo(String wardRoomNo) {
        this.wardRoomNo = wardRoomNo;
    }

    public String getBedNo() {
        return bedNo;
    }

    public void setBedNo(String bedNo) {
        this.bedNo = bedNo;
    }

    public String getStopFlag() {
        return stopFlag;
    }

    public void setStopFlag(String stopFlag) {
        this.stopFlag = stopFlag;
    }

    public String getPyCode() {
        return pyCode;
    }

    public void setPyCode(String pyCode) {
        this.pyCode = pyCode;
    }

    public String getWbCode() {
        return wbCode;
    }

    public void setWbCode(String wbCode) {
        this.wbCode = wbCode;
    }

    public String getDeptSort() {
        return deptSort;
    }

    public void setDeptSort(String deptSort) {
        this.deptSort = deptSort;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getBedLabel() {
        return bedLabel;
    }

    public void setBedLabel(String bedLabel) {
        this.bedLabel = bedLabel;
    }

    public String getBedStatus() {
        return bedStatus;
    }

    public void setBedStatus(String bedStatus) {
        this.bedStatus = bedStatus;
    }

    public String getBedGrade() {
        return bedGrade;
    }

    public void setBedGrade(String bedGrade) {
        this.bedGrade = bedGrade;
    }

    public String getBedCategory() {
        return bedCategory;
    }

    public void setBedCategory(String bedCategory) {
        this.bedCategory = bedCategory;
    }

    public String getBedSex() {
        return bedSex;
    }

    public void setBedSex(String bedSex) {
        this.bedSex = bedSex;
    }

    public void initAdd() {
        dataVersion=1;
        hospitalId=StateEnum.HOSPITAL_ID.getValue();
        gmtCreate=new Timestamp(new Date().getTime());
        gmtModify=new Timestamp(new Date().getTime());
    }

    public Integer getDataVersion() {
        return dataVersion;
    }

    public void setDataVersion(Integer dataVersion) {
        this.dataVersion = dataVersion;
    }

    public Timestamp getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Timestamp gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Timestamp getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(Timestamp gmtModify) {
        this.gmtModify = gmtModify;
    }

    public String getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(String hospitalId) {
        this.hospitalId = hospitalId;
    }
}
